import request from '@/utils/request'

export function contractList(data) {
  return request({
    url: '/wzj/contract/list',
    method: 'post',
    data
  })
}

export function contractSelect(customerId) {
  return request({
    url: '/wzj/contract/select',
    method: 'get',
    params: { customerId }
  })
}
export function contractDetail(contractId) {
  return request({
    url: '/wzj/contract/get',
    method: 'get',
    params: { contractId }
  })
}

export function addContract(data) {
  return request({
    url: '/wzj/contract/create',
    method: 'post',
    data
  })
}

export function updateContractStatus(data) {
  return request({
    url: '/wzj/contract/update_status',
    method: 'post',
    data
  })
}

export function CreateContractEvent(data) {
  return request({
    url: '/wzj/contract/event/create',
    method: 'post',
    data
  })
}

export function GetContractEventList(contractId) {
  return request({
    url: '/wzj/contract/event/list',
    method: 'get',
    params: { contractId }
  })
}

export function CreateContractAccessory(data) {
  return request({
    url: '/wzj/contract/accessory/create',
    method: 'post',
    data
  })
}

export function GetContractAccessoryList(contractId) {
  return request({
    url: '/wzj/contract/accessory/list',
    method: 'get',
    params: { contractId }
  })
}
